package com.heatingcharge.param;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description: heating_charge_server
 * User: Devin
 * Date: 2019-11-08
 * Time: 10:30
 */
@Data
public class ChargeRefundParam {
    /**
     * 自动增加
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @NotNull(message = "房屋ID不能为空")
    @Min(value = 1,message = "房屋ID不能小于1")
    private Integer houseId;

    @NotNull(message = "供暖季ID不能为空")
    @Min(value = 1,message = "供暖季ID不能小于1")
    private Integer heatYearId;

    @NotNull(message = "退费金额不能为空")
    @Min(value =0,message = "退费金额不能小于0")
    private BigDecimal amount;

    /**
     * 退费方式 1:结转 2:退费
     */
    @NotNull(message = "退费方式不能为空")
    private Integer mode;

    /**
     * 退费日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date refundDate;

    private String remark;
}
